package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * ClusterMessage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "cluster_message", catalog = "imcdbserver")
public class ClusterMessage implements java.io.Serializable {

	// Fields

	private long num;
	private Integer dst;
	private Integer src;
	private String timeStamp;
	private String timeLimit;
	private String content;
	private Integer majorId;
	private Integer minorId;

	// Constructors

	/** default constructor */
	public ClusterMessage() {
	}

	/** minimal constructor */
	public ClusterMessage(Integer dst, Integer src) {
		this.dst = dst;
		this.src = src;
	}

	/** full constructor */
	public ClusterMessage(Integer dst, Integer src, String timeStamp,
			String timeLimit, String content, Integer majorId, Integer minorId) {
		this.dst = dst;
		this.src = src;
		this.timeStamp = timeStamp;
		this.timeLimit = timeLimit;
		this.content = content;
		this.majorId = majorId;
		this.minorId = minorId;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "num", unique = true, nullable = false)
	public long getNum() {
		return this.num;
	}

	public void setNum(long num) {
		this.num = num;
	}

	@Column(name = "dst", nullable = false)
	public Integer getDst() {
		return this.dst;
	}

	public void setDst(Integer dst) {
		this.dst = dst;
	}

	@Column(name = "src", nullable = false)
	public Integer getSrc() {
		return this.src;
	}

	public void setSrc(Integer src) {
		this.src = src;
	}

	@Column(name = "time_stamp", length = 20)
	public String getTimeStamp() {
		return this.timeStamp;
	}

	public void setTimeStamp(String timeStamp) {
		this.timeStamp = timeStamp;
	}

	@Column(name = "time_limit", length = 20)
	public String getTimeLimit() {
		return this.timeLimit;
	}

	public void setTimeLimit(String timeLimit) {
		this.timeLimit = timeLimit;
	}

	@Column(name = "content", length = 16777215)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "major_id")
	public Integer getMajorId() {
		return this.majorId;
	}

	public void setMajorId(Integer majorId) {
		this.majorId = majorId;
	}

	@Column(name = "minor_id")
	public Integer getMinorId() {
		return this.minorId;
	}

	public void setMinorId(Integer minorId) {
		this.minorId = minorId;
	}

}